function xnext = f_robot(x, u, dt)

% state x:
% 1: north
% 2: east
% 3: heading
% 4-5: n,e of landmark 1
% 6-7: ...

% control inputs:
% 1: commanded forward speed
% 2: commanded angular rate
xnext = x;
if(length(x) > 3) % state contains landmarks in addition to robot position and orientation:
    xnext(4:end) = x(4:end); % -- landmarks don't move
end

% your code here to compute xnext entries 1, 2, and 3
xnext(1) = x(1) + u(1)*cos(x(3))*dt;
xnext(2) = x(2) + u(1)*sin(x(3))*dt;
xnext(3) = x(3) + u(2)*dt;
